public  class Extends {
    public static void main(String[] args) {
        Cat cat = new Cat("茂袜子",22,"yellow",120,170,20);
        Dog dog = new Dog("铭袜子",22,"white",120,175,1);
        Pet p = new Pet("f",22,"blue",10,120,2000);
        p.enjoy();
        cat.show();
        dog.show();
        cat.show();
    }
}
class Pet{
    Pet(String name,int age,String color,double weight,double height, double price){
        this.name = name;
        this.age = age;
        this.color = color;
        this.weight = weight;
        this.price =  price;
    }
    int xx = 200;
    String name;
    String color;
    int age;
    double weight;
    double height;
    double price;
    public void move(){
        System.out.println("我是可以移动的");
    }
    public void enjoy(){
        System.out.println("我很高兴");
    }
    public void show(){

        System.out.println(name);
        System.out.println(color);
        System.out.println(age);
        System.out.println(weight);
        System.out.println(height);
    }

}
class Cat extends Pet{
    Cat(String name,int age,String color,double weight,double height,double price){
        super(name, age, color, weight, height, price);
    }
    int xx = 5;
    public void show(){
        System.out.println("子类的xx"+xx);
        System.out.println("父类的xx"+super.xx);
    }
}
class Dog extends Pet{
    Dog(String name, int age, String color, double weight, double height, double price) {
        super(name, age, color, weight, height, price);
    }
}
class Bird extends Pet{
    Bird(String name, int age, String color, double weight, double height, double price) {
        super(name, age, color, weight, height, price);
    }
}



